package com.employee.attendance_daka.mapper;

import com.employee.attendance_daka.domain.Attendance;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

public interface AttendanceMapper {

    boolean isEmployee(String employeeId);

    int addAttendance(String employeeId, String employeeName, LocalDateTime clockTime, String attendaceStatus, String remark);

    boolean isEmployeeMatch(@Param("employeeId") String employeeId, @Param("employeeName") String employeeName);

    Attendance getAttendanceById(int id);

    int deleteAttendance(int id);

    int updateAttendance(@Param("id") int id, @Param("remark") String remark);
    
    List<Attendance> getAttendancesByCondition(@Param("employeeId") String employeeId, 
                                              @Param("employeeName") String employeeName, 
                                              @Param("startTime") LocalDateTime startTime, 
                                              @Param("endTime") LocalDateTime endTime);
}